package router

import (
	"github.com/gin-gonic/gin"
	"lab.com/controller"
)

// 科研成果的接口
func initAchievementRouter(e *gin.Engine) {

	achievementControl := controller.Achievement
	achievementRouter := e.Group("/achievement")

	// 所有用户可查看，展示在官网首页上面
	achievementRouter.GET("list", achievementControl.List)
	achievementRouter.GET("detail", achievementControl.Detail)

	// 管理员，对科研成果进行管理
	achievementRouter.POST("manage/add", achievementControl.Add)
	achievementRouter.GET("manage/delete", achievementControl.Delete)
	achievementRouter.POST("manage/edit", achievementControl.Edit)
	achievementRouter.GET("manage/show", achievementControl.Show)
	achievementRouter.GET("manage/home", achievementControl.Home)
	achievementRouter.GET("manage/list", achievementControl.ListInManage)
}
